<template>
	<view>
		<view class="headerBar">  
			<!-- 状态栏占位 -->  
			<view class="statusBar" :style="{height:statusBarHeight+'px'}"></view>
		</view>
	</view>
</template>

<script>
	//var system = uni.getSystemInfoSync();
	export default {
		name: "FatFatMeng-NVUE-barHeight",
		data() {
			return {
				statusBarHeight: '', // 状态栏
			};
		},
		created() {
			let _t = this;
			setTimeout(() => { //获取状态栏高度，setTimeout后才能调用uni.  
				uni.getSystemInfo({
					success: function(res) {
						_t.statusBarHeight = res.statusBarHeight;
						//console.log(_t.statusBarHeight);
					}
				});
			}, 1);
		}
	}
</script>

<style lang="scss" scoped>
	.headerBar {  
	    //background-image: linear-gradient(to right, #a80077, #66ff00);  
	    //background-color: #FFFFFF;
		width: 750px;  
	    position: fixed;  
	    top: 0;  
	} 
</style>
